<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>模板语法</title>
    <script src="../../JS/vue.js"></script>
  </head>
  <body>
    <!-- 插值语法用于标签内容 
       指令用于标签属性
    -->
    <div id="root">
      <h2>{{name}}</h2>
      <h3>{{school.name}}</h3>
      <a v-bind:href="url.toUpperCase()">去百度</a>
      <!-- 简写 -->
      <a :href="url">去百度</a>
    </div>
    <script type="text/javascript">
      Vue.config.productionTip = false; //阻止Vue在启动的时生成生产提示

      new Vue({
        el: "#root",
        data: {
          name: "xiaoMo",
          url: "https:www.baidu.com",
          school: {
            name: "xiaowan",
          },
        },
      });
    </script>
  </body>
</html>
